package com.AnimalTest;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {

        ArrayList<LiHua>list1 = new ArrayList<>();
        ArrayList<Dahaung>list2 = new ArrayList<>();

        ArrayList<Hasuki>list3 = new ArrayList<>();
        ArrayList<PersianCat>list4 = new ArrayList<>();


        keepPet(list1);
        keepPet(list2);
        keepPet(list3);
        keepPet(list4);




    }
    public static void keepPet(ArrayList<? extends Animal> list){
       for(Animal a:list){

           a.eat();

       }
    }
}
